package com.tedu;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        //加载spring的配置文件  启动spring
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");

        //获取dog对象
        Dog bean = applicationContext.getBean(Dog.class);
        System.out.println(bean);

        Person bean1 = applicationContext.getBean(Person.class);
        System.out.println(bean1);

    }
}
